package com.wl.cloud.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wl.cloud.core.model.AbstractBaseDeleteModel;
import com.wl.cloud.system.support.utils.ConstantSystem;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * @author: wanglin
 * @date: 2023-09-13 周三
 * @Version: 1.0
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity(name = SysRole.TABLE_NAME)
@Table(appliesTo = SysRole.TABLE_NAME, comment = "角色表")
@TableName(value = SysRole.TABLE_NAME)
public class SysRole extends AbstractBaseDeleteModel {
    public static final String TABLE_NAME = ConstantSystem.TABLE_PREFIX + "role";

    @Column(columnDefinition = "varchar(50) comment '角色code'", nullable = false)
    private String code;
    @Column(columnDefinition = "varchar(50) comment '角色名称'", nullable = false)
    private String name;
    @Column(columnDefinition = "int(1) not null default 0 comment '状态,0:正常 ；1:禁用'")
    private Integer status;
    @Column(columnDefinition = "int default 0 comment '排序号'")
    private Integer orderIndex;
    @Column(columnDefinition = "varchar(200) comment '描述'")
    private String description;
}